<?php

function get_likes($name){

    $names = array();


    $json_text = file_get_contents('https://graph.facebook.com/me/likes?access_token=AAADMGvBkFIgBAIeg0SsH1NyWLWzoBOZBBlKikbTfbZAxzK9vDgXeuLG7miS6tzMdXQQvkzJ3JZA7RAQiiySou6CHoqpERm5EjZByjJu1YHN885o0wIoQ');

    
    $json = json_decode($json_text);
    $json_data = $json->{'data'};
    

    foreach ($json_data as $a){
        array_push($names, $a);
    }

    echo $names;
    foreach($names as $l){
        print $l;
    }
}
?>
